package com.wu.pojo.reqeust.sys;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;
import java.io.Serializable;

@Data
public class PhoneLoginRequest implements Serializable {
    private static final long serialVersionUID = -2166431887596878192L;

    @ApiModelProperty(value = "手机号")
    @NotBlank(message = "请输入正确的手机号")
    @Pattern(regexp = "[0-9]*", message = "请输入正确的手机号")
    @Size(max = 11, min = 11, message = "请输入正确的手机号")
    private String phone;

    @ApiModelProperty(value = "验证码")
    @NotBlank(message = "请输入正确的验证码")
    @Pattern(regexp = "[0-9]*", message = "请输入正确的验证码")
    @Size(max = 6, min = 6, message = "请输入正确的验证码")
    private String code;

}
